]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Add a debug keybinding to pause/resume all tweens
authorJasper St. Pierre <jstpierre@mecheye.net>
Tue, 14 Jan 2014 13:49:32 +0000 (08:49 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 14 Jan 2014 22:25:14 +0000 (17:25 -0500)
So we can inspect a mid-tween scene easier.

data/org.gnome.shell.gschema.xml.in.in
js/ui/windowManager.js

index 617bc3868e695e47aeac39fced571cfdc6299040..91cec0426a13eeca9dbf4ef8350f4732d6a4d740 100644 (file)
         Keybinding to focus the active notification.
       </_description>
     </key>
+    <key name="pause-resume-tweens" type="as">
+      <default>[]</default>
+      <summary>Keybinding that pauses and resumes all running tweens, for debugging purposes</summary>
+      <description></description>
+    </key>
   </schema>
 
   <schema id="org.gnome.shell.keyboard" path="/org/gnome/shell/keyboard/"
index a0531a86cde20a3f58befc2502d960d91ab333ab..a408014bb519e4c9a92d11128875993c59dc82f0 100644 (file)
@@ -556,6 +556,12 @@ const WindowManager = new Lang.Class({
                                         Shell.KeyBindingMode.LOGIN_SCREEN,
                                         Lang.bind(this, this._startA11ySwitcher));
 
+        this.addKeybinding('toggle-tweens',
+                           new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
+                           Meta.KeyBindingFlags.NONE,
+                           Shell.KeyBindingMode.ALL,
+                           Lang.bind(this, this._toggleTweens));
+
         this.addKeybinding('open-application-menu',
                            new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
                            Meta.KeyBindingFlags.NONE,
@@ -1088,6 +1094,15 @@ const WindowManager = new Lang.Class({
         Main.panel.toggleAppMenu();
     },
 
+    _toggleTweens: function() {
+        this._tweensPaused = !this._tweensPaused;
+        const OrigTweener = imports.tweener.tweener;
+        if (this._tweensPaused)
+            OrigTweener.pauseAllTweens();
+        else
+            OrigTweener.resumeAllTweens();
+    },
+
     _showWorkspaceSwitcher : function(display, screen, window, binding) {
         if (!Main.sessionMode.hasWorkspaces)
             return;